/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.pokemon.services;

import com.pokemon.dto.TrainerDTO;
import java.util.List;
import javax.jws.WebParam;
import javax.jws.WebService;

/**
 *
 * @author Branislav Paulis
 */
@WebService
public interface TrainerService {
    /**
     * Adds trainer into the database.
     * 
     * @param trainer trainer to be added
     */
    TrainerDTO addTrainer(@WebParam(name = "trainer") TrainerDTO trainer);

    /**
     * Extract trainer from database according its id.
     * 
     * @param id is id of trainer which we want get from the database
     * @return trainer acoording id, null while id can not be found
     */
    TrainerDTO getTrainer(@WebParam(name = "id") Long id);
    
    /**
     * Updates trainer in the database.
     * 
     * @param trainer trainer to be updated
     */
    TrainerDTO updateTrainer(@WebParam(name = "trainer") TrainerDTO trainer);
    
    /**
     * Removes trainer from the database.
     * 
     * @param trainer trainer to be removed
     */
    TrainerDTO removeTrainer(@WebParam(name = "trainer") TrainerDTO trainer);
    
    /**
     * Method finds all trainers in database and returns them
     * If there are no trainers in the database, method returns empty list.
     * 
     * @return list of all trainers in the database
     */
    List<TrainerDTO> getAllTrainers();
}